//package com.woniu.CarPlatform.config;
//import com.netflix.loadbalancer.AbstractLoadBalancerRule;
//import com.netflix.loadbalancer.ILoadBalancer;
//import com.netflix.loadbalancer.Server;
//
//
//import java.util.List;
//import java.util.Random;
//
///**
// * @ClassName MyRule
// * @Description
// * @Author 王维鑫
// * @Version
// **/
//
//public class MyRule extends AbstractLoadBalancerRule {
//    @Override
//    public Server choose(Object o) {
//        ILoadBalancer loadBalancer = getLoadBalancer();
//        List<Server> reachableServers = loadBalancer.getReachableServers();
//        Server server = reachableServers.get(new Random().nextInt(reachableServers.size()));
//        return server;
//    }
//    @Override
//    public void initWithNiwsConfig(IClientConfig iClientConfig) {
//
//    }
//}